Ternary 三元運算子


Posted by Rich on 2021-04-22

console.log(10 > 5 ? 'bigger' : 'smaller')
output:bigger

condition ? true : false
條件 ? true就執行 : false就執行


#note







Related Posts

測試 webhook 不再煩惱:ngrok

測試 webhook 不再煩惱:ngrok

資料傳輸物件與設計模式之間的使用

資料傳輸物件與設計模式之間的使用

Express框架 Q A

Express框架 Q A


Comments